package com.mcxx.modules.miniSalvation.family.dao.write;

import com.mcxx.modules.miniSalvation.family.entity.FamilyMemberEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface FamilyMemberWriteDao {

    int insert(FamilyMemberEntity familyMember);


    int inserts(List<FamilyMemberEntity> familyMemberList);


    int insertIgnoreNull(FamilyMemberEntity familyMember);


    int update(FamilyMemberEntity familyMember);


    int updateIgnoreNull(FamilyMemberEntity familyMember);


    int delete(FamilyMemberEntity familyMember);


    int deleteFamilyMemberByIdcard(String idcard);



    Boolean updateFamilyRelationNo(String familyId, String salvationNo);


    int updateIsSaveObject(String memberId, String isSaveObject);


    int batchUpdateStateByFamilyIds(@Param("state") String state,@Param("list") List<String> familyIdList);


    int updateFamilyIdByOldFamilyIdAndIdcard(@Param("familyId") String familyId,@Param("idcard") String idcard,@Param("newFamilyId") String newFamilyId);


    int updateFamilyRelationForExpire(String familyId, String idcard);


    int updateByIdCard(FamilyMemberEntity memberEntity);


    int updateAreaCodeByFamilyId(@Param("areaCode") String areaCode, @Param("familyId") String familyId);


    int batchUpdateIgnoreNull(List<FamilyMemberEntity> familyMember);

    int updateDocHelpPoor(String memberId,String docHelpPoor);



    int changApplyMember(@Param("memberId") String memberId,@Param("familyId") String familyId);

    int updateNoSave(@Param("familyId") String familyId);


    int updateMemberByMemberHistory(@Param("familyId") String familyId, @Param("orderId") String orderId);


    int updateExpireByFamilyId(@Param("familyId") String familyId);

    int resetMemberState(@Param("familyId") String familyId);

    int deleteUnNormalMember(@Param("familyId") String familyId);

    int copyFamilyMemberSource(@Param("familyId") String familyId);


    int copyMemberByMemberId(@Param("memberId") String memberId);

    int deleteFamilyMemberById(@Param("familyId") String familyId);

}
